﻿var status = 0;
var p1 = "#fUI/StatusBar2.img/starPlanet/achive/1#";
var e1 = "#fUI/TenthAnniversaryBoardGame.img/TenthBoardGameUI/bossColor/2/nomal/0#";
var e2 = "#fUI/TenthAnniversaryBoardGame.img/TenthBoardGameUI/bossColor/4/nomal/0#";
var e3 = "#fUI/TenthAnniversaryBoardGame.img/TenthBoardGameUI/bossColor/6/nomal/0#";
var tz12 = "#fEffect/CharacterEff/1112924/0/0#";  //黄星
var tz13 = "#fEffect/CharacterEff/1112925/0/0#";  //蓝星
var tz14 = "#fEffect/CharacterEff/1112926/0/0#";  //红星
var q6 ="#fUI/RunnerGame.img/RunnerGameUI/UI/Point/2#"
var d1 ="#fUI/CashShop.img/CSEffect/event/0#"
var d2 ="#fUI/CashShop.img/CSEffect/time/0#"
var d3 ="#fUI/SoulUI.img/DungeonMap/icon/warpGate/0#"
var d4 ="#fUI/SoulUI.img/DungeonMap/icon/soulFragment/0#"
var icon = "#fUI/UIWindow.img/PvP/Scroll/enabled/next2#";
//"#fUI/Basic.img/BtMin2/normal/0#";
var iconEvent = "#fUI/UIWindow.img/PvP/Scroll/enabled/next2#";
//"#fUI/UIToolTip.img/Item/Equip/Star/Star#";
var icon2 = "#fUI/UIToolTip.img/Item/Equip/Star/Star#";
var aaa = "#fUI/UIWindow/AriantMatch/characterIcon/5#";
var yun = "#fUI/UIWindow/Megaphone/2#"; ////红沙漏
var yun2 = "#fUI/UIWindow/Quest/icon8/0#"; ////蓝指标
var yun8 = "#fUI/UIWindow/MonsterBook/arrowLeft/normal/0#"; ////金左指标
var yun9 = "#fUI/UIWindow/MonsterBook/arrowRight/normal/0#"; ////金右指标
var yun4 = "#fUI/UIWindow/Quest/reward#"; ////奖励
var ttt = "#fUI/UIWindow/Quest/icon2/7#"; //"+ttt+"//美化1
var ttt2 = "#fUI/UIWindow/Quest/icon6/7#"; ////美化2
var ttt3 = "#fUI/UIWindow/Quest/icon3/6#"; //"+ttt3+"//美化圆
var ttt4 = "#fUI/UIWindow/Quest/icon5/1#"; //"+ttt4+"//美化New
var ttt5 = "#fUI/UIWindow/Quest/icon0#"; ////美化!
var ttt7 = "#fUI/Basic/BtHide3/mouseOver/0#"; //"+ttt6+"//美化会员
var ttt6 = "#fUI/UIWindow.img/PvP/Scroll/enabled/next2#";
var epp = "#fEffect/CharacterEff/1082312/0/0#"; //彩光
var eff = "#fCharacter/Weapon/01702523.img/48/straight/0/effect#"; //彩虹带
var eff = "#fEffect/CharacterEff/1112905/0/1#"; //
var epp = "#fEffect/CharacterEff/1082312/0/0#"; //彩光
var epp1 = "#fEffect/CharacterEff/1082312/2/0#"; //彩光1
var axx = "#fEffect/CharacterEff/1051294/0/0#"; //爱心
var xxx = "#fEffect/CharacterEff/1082565/2/0#"; //星系
var ppp = "#fEffect/CharacterEff/1112907/4/0#"; //泡炮 
var epp3 = "#fEffect/CharacterEff/1112908/0/1#"; //彩光3
var axx1 = "#fEffect/CharacterEff/1062114/1/0#"; //爱心
var zs = "#fEffect/CharacterEff/1112946/2/0#"; //砖石粉
var zs1 = "#fEffect/CharacterEff/1112946/1/1#"; //砖石蓝
var dxxx = "#fEffect/CharacterEff/1102232/2/0#"; //星系
var tz = "#fEffect/CharacterEff/1082565/2/0#"; //兔子蓝
var tz1 = "#fEffect/CharacterEff/1082565/4/0#"; //兔子粉
var tz7 = "#fEffect/CharacterEff/1112900/3/1#"; //音符红
var tz8 = "#fEffect/CharacterEff/1112900/4/1#"; //音符绿
var tz88 = "#fEffect/CharacterEff/1112900/5/1#"; //音符绿!
var yun1 = "#fUI/UIWindow/Quest/icon7/10#"; ////红色圆
var tz9 = "#fEffect/CharacterEff/1112902/0/0#"; //蓝心
var tz10 = "#fEffect/CharacterEff/1112903/0/0#"; //红心
var tz11 = "#fEffect/CharacterEff/1112904/0/0#"; //彩心
var tz12 = "#fEffect/CharacterEff/1112924/0/0#"; //黄星
var tz13 = "#fEffect/CharacterEff/1112925/0/0#"; //蓝星
var tz14 = "#fEffect/CharacterEff/1112926/0/0#"; //红星
var tz15 = "#fEffect/CharacterEff/1112949/0/0#"; //花样音符
var tz16 = "#fEffect/CharacterEff/1112949/1/0#"; //花样音符
var tz17 = "#fEffect/CharacterEff/1112949/2/0#"; //花样音符
var tz18 = "#fEffect/CharacterEff/1112949/3/0#"; //花样音符
var tz19 = "#fEffect/CharacterEff/1112949/4/0#"; //花样音符
var tz20 = "#fEffect/CharacterEff/1114000/1/0#"; //红星花
var p3 = "#fUI/UIToolTip.img/Item/Equip/Star/Star#";
var p4 = "#fUI/StarCityUI.img/GradeInfo/icon_ss/7#"
var p1 = "#fUI/SoulUI.img/DungeonMap/icon/soulTrap/0#"
var p = "#fUI/StarCityUI.img/GradeInfo/icon_ss/2#"
var q6 = "#fUI/RunnerGame.img/RunnerGameUI/UI/Point/2#"
var p2 = "#fUI/SoulUI.img/DungeonMap/icon/dungeonItem/0#"
var e2 = "#fUI/Basic.img/HScr7/enabled/base#"
var e1 = "#fUI/Basic.img/HScr7/enabled/next0#"
var e3 = "#fUI/Basic.img/HScr7/enabled/prev0#"
var icon2 = "#fUI/UIToolTip.img/Item/Equip/Star/Star#";
var d1 ="#fUI/CashShop.img/CSEffect/event/0#";
var d2 ="#fUI/CashShop.img/CSEffect/time/0#";
var d3 ="#fUI/SoulUI.img/DungeonMap/icon/warpGate/0#";
var d4 ="#fUI/SoulUI.img/DungeonMap/icon/soulFragment/0#";
var head = "#fUI/UIWindow2.img/Quest/quest_info/summary_icon/summary#\r\n";
function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (status == 0 && mode == 0) {
        cm.dispose();
        return;
    }
    if (mode == 1) {
        status++;
    } else {
        status--;
    }
    if (status == 0) {
        var selStr = "#e#r┄┄┄┅═☆  "+q6+"  十字军团  "+q6+"  ☆═┅┄┄┄\r\n\r\n\r\n"+d2+""+d1+""+d2+""+d1+""+d2+""+d1+""+d2+""+d1+""+d2+""+d1+""+"\r\n#fUI/UIWindow2.img/Quest/quest_info/summary_icon/summary#\r\n#d通过副本、任务获得道具来升级资格证。S级猎人资格证每周可领取,中介币，超级魔方，高级装备无损卷,装备材料！\r\n#e#b#L5#"+d4+" 升级介绍#l#L6##r"+d4+" 十字商店#l#L7##g"+d4+" 每周福利#k#l\r\n\r\n#L1##r"+d3+" 见习猎人资格证#l\r\n#L2#"+d3+" B级猎人资格证#l\r\n#L3#"+d3+" A级猎人资格证#l\r\n#L4#"+d3+" S级猎人资格证#l\r\n\r\n\r\n"+d2+""+d1+""+d2+""+d1+""+d2+""+d1+""+d2+""+d1+""+d2+""+d1+""+"#v4310029# #v4310143# #v4310029# #v4310143# #v4310029# #v4310143# #v4310029# #v4310143#";
        cm.sendSimple(selStr);
    } else if (status == 1) {
        switch (selection) {

        case 1:
            if (cm.getMeso() >= 10000000 && cm.haveItem(4310029,200) && cm.haveItem(4310143,50)) {
                cm.gainMeso( - 1000000);
		cm.gainItem(4310029, -200);//十字币
		cm.gainItem(4310143, -50); //BOSS币
                cm.gainItem(3700031,1);//见习猎人资格证
                cm.sendOk("兑换 见习猎人资格证 成功,祝你游戏愉快!");
            } else {
                cm.sendOk("失败：\r\n\r\n#r1). 需要的道具金币不够.\r\n2). 资格证级别不对.\r\n3). 装备栏不足请及时清理.");
            }
            break;
      case 2:
            if (cm.getMeso() >= 30000000 && cm.haveItem(4310029,500) && cm.haveItem(4310143,150) && cm.haveItem(3700031,1)) {
                cm.gainMeso( - 3000000);
		cm.gainItem(4310029, -500); //十字币
		cm.gainItem(4310143, -150); //BOSS币
		cm.gainItem(3700031, -1);  //见习猎人资格证
                cm.gainItem(3700032,1); //B级猎人资格证
                cm.sendOk("兑换 B级猎人资格证 成功,祝你游戏愉快!");
            } else {
                cm.sendOk("失败：\r\n\r\n#r1). 需要的道具金币不够.\r\n2). 资格证级别不对.\r\n3). 装备栏不足请及时清理.");
            }
            break;
    case 3:
            if (cm.getMeso() >= 50000000 && cm.haveItem(4310029,800) && cm.haveItem(4310143,200) && cm.haveItem(3700032,1)) {
                cm.gainMeso( - 50000000);
		cm.gainItem(4310029, -800); //十字币
		cm.gainItem(4310143, -200); //BOSS币
		cm.gainItem(3700032, -1);  //B级猎人资格证
                cm.gainItem(3700033,1);  //A级猎人资格证
                cm.sendOk("兑换 A级猎人资格证 成功,祝你游戏愉快!");
            } else {
                cm.sendOk("失败：\r\n\r\n#r1). 需要的道具金币不够.\r\n2). 资格证级别不对.\r\n3). 装备栏不足请及时清理.");
            }
            break;
  case 4:
            if (cm.getMeso() >= 80000000 && cm.haveItem(4310029,1200) && cm.haveItem(4310143,300) && cm.haveItem(3700033,1)) {
                cm.gainMeso( - 80000000);
		cm.gainItem(4310029, -1200); //十字币
		cm.gainItem(4310143, -300); //BOSS币
		cm.gainItem(3700033, -1);  //A级猎人资格证
                cm.gainItem(3700034,1);  //S级猎人资格证
                cm.sendOk("兑换 S级猎人资格证 成功,祝你游戏愉快!");
            } else {
                cm.sendOk("失败：\r\n\r\n#r1). 需要的道具金币不够.\r\n2). 资格证级别不对.\r\n3). 装备栏不足请及时清理.");
            }
            break;
			case 5:
            cm.dispose();
            //cm.openNpc(9900003,24);
              cm.sendOk(head+"\r\n"+"#e#r见习猎人资格证：\r\n#d1). 1000W金币.\r\n2). 200个十字币.\r\n3). 50个BOSS.\r\n4). B级猎人资格证\r\n#rB级猎人资格证：\r\n#d1). 3000W金币.\r\n2). 500个十字币.\r\n3). 150个BOSS币.\r\n4).B级习猎人资格证一个\r\n#rA级猎人资格证：\r\n#d1). 5000W金币.\r\n2). 800个十字币.\r\n3). 200个BOSS币.\r\n4).A级猎人资格证一个\r\n#rS级猎人资格证：\r\n#d1). 8000W金币.\r\n2). 1200个十字币.\r\n3). 300个BOSS币.\r\n4). S级猎人资格证一个");
            break;
case 6:
            cm.dispose();
            cm.openShop(128251);
            break;
		case 7:
            cm.dispose();
            cm.warp(931050500);
            break;
        }
        cm.dispose();
    }
}
